// pages/doctor-programmeDetail/doctor-programmeDetail.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrl: app.globalData.imgUrl,
    localImg: app.globalData.staticimgUrl,  // 本地图片
    schemeId :'',
    dataDetail:{}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    const that = this;
    //console.log(options.businessId)
    let param;
    if (options.businessId){
     param = {
        schemeId: options.businessId
      };
    }else{
      param = {
        demandId: options.demandId
      };
    } 

    app.request({
      url: "doctor/demandApi/getSchemeDetail",
      data: param,
      success: function (res) {
        that.setData({
          dataDetail:res.data
        })
      },
      fail: function (res) {
        // app.requestFail(res);
      }
    });
    
  }

})